Part Number Hot Search : 
IN493 MAX40 MCL2501 UZ4110 DTA124 BRF10100 P5630 T3003
Product Description
Full Text Search
 

To Download AN87 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  nov 96 AN87rev1 1 copyright ? crystal semiconductor corporation 1996 (all rights reserved) crystal semiconductor corporation p.o. box 17847, austin, texas 78760 (512) 445 7222 fax: (512) 445 7581 http://www.crystal.com AN87 technical report: pc wakeup via ethernet by dr. robert (bob) bridge, director of lan products crystal semiconductor corp. 4210 s. industrial ave. austin, tx 78744 usa phone: 512-912-3248 fax: 512-912-3871 email: rfb@crystal.cirrus.com 1. introduction wakeup technology addresses the basic question of how to conserve electricity in an office or home while at the same time allowing a pc to accessed anytime over the network. night-time or weekend access to a client may be used for a number of rea- sons, including: ? allowing a server application to update an ap- plication on all clients to the latest application revision level ? allowing a virus scan to be performed on all cli- ents ? allowing a system program to remove games from the clients ? allowing a remote lan-access application to transfer desktop files to a mobile user ? allowing a check of the hardware configuration (identifying any theft of memory modules) crystal and ibm have implemented such a scheme of access to a powered-down pc. this collabora- tion has resulted in an wakeup implementation in the cs8920 ethernet controller ic that allows a networked pc to go completely asleep, yet still al- low the network administrator or some kind of net- work management software to wake up the pc simply by sending it a specific ethernet frame. this is a standard ethernet frame, which contains a spe- cific data pattern detected by the cs8920 on the re- ceiving end. the cs8920 then alerts the pc system, and the power management circuitry wakes up the system. 2. wakeup technical overview once the cs8920 has been put into wakeup mode, it will scan all incoming frames for a specific data sequence that will indicate to the controller that this is a wakeup frame. typically, a wakeup frame will be a broadcast frame because broadcast frames can pass through routers, even if the ethernet mac (media access controller) address (or individual ad- dress, ia) is not present in the router address tables. the payload of the frame must contain the wakeup command, which contains at least six contiguous synchronization bytes (six repetitions of ffh) fol- lowed immediately by sixteen repetitions of the 6- byte ia, with no unused bits between successive ia occurrences. this information can appear any- where in the payload, but must be byte aligned. the cs8920 uses the six ffh bytes to determine when to begin the address match. a wakeup frame may contain multiple occurrences of the "six ffh + sixteen ia" pattern. the cs8920
AN87 2 AN87rev1 checks each pattern for an ia match. multiple pat- terns allow both the burned-in ieee ia and also a locally-administered ia to be broadcast. the cs8920 compares the address in the pattern with the contents of the ia address, to determine if the pc should be awakened. see table 2 for the vari- ous wakeup states and state transitions. the specific sequence in a wakeup frame consists of 16 duplications of the ieee address of this ethernet node. this sequence can be located any- where within the frame, but must be preceded by a preamble of 6 bytes of ff to ensure the state ma- chine scanning the frame starts at the appropriate place. the preamble is sent from the network man- agement software to insure that the state machine in the cs8920 is not fooled by a miscellaneous byte, identical to the first byte of the sequence, being placed in front of the 16 duplications of the ieee address. the preamble insures that the state ma- chine starts in the proper place. if the cs8920 scans a frame and does not find the specific sequence shown above, it will simply dis- card this particular frame and take no further ac- tions. if, however, the controller does detect that the current frame is indeed a wakeup frame, then the cs8920 will alert the pc's power management circuitry to wake up the system. if the ieee address for a particular node on the net- work was 11h 22h 33h 44h 55h 66h, then the lan controller would be scanning for the data sequence (assuming an ethernet frame): destination source misc ff ff ff ff ff ff 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 11 22 33 44 55 66 misc crc 3. wakeup design and system considerations figure 1 shows the basic application diagram for the cs8920 on a pc motherboard. the cs8920 is connected to an auxiliary power supply so the ethernet function remains powered when the cpu and isa bus are powered down. the cs8920 has a wakeup signal which is connected to the advanced power management block. figure 1. application diagram
AN87 AN87rev1 3 3.1 pc design considerations below are some issues that must be addressed for the wakeup technology support to work properly. maintain power to ethernet controller: the power to the cs8920 must be maintained at all times, allowing the cs8920 to scan all incoming packets for the wakeup technology. thus the cs8920 is powered by the pcs auxiliary +5v power supply. during wakeup, the cs8920 must be isolated from the power supply of the system. figure 2 shows details of how the cs8920s power supply is isolated from the pcs main power sup- ply. figure 2. power supply isolation the pmos fet is optional. if the design and pow- er supply requires that aux +5v supply should not get connected to +5 v supply, then only use the pmos device other wise connected the aux 5 v di- rectly to the vcc plane for the cs8920 (as shown by the dotted line). add support to power management circuitry: in a normal system, the power management circuit- ry looks for any one of several events to wake up the system. events such as keyboard entries or mouse movement that would cause the system to wake up. to use wakeup technology, the power management must include a wakeup frame re- ceived as a condition to wake up the system. in the case where the cs8920 will be located on the motherboard, it is a simple matter to connect the cs8920 ewake pin into the power management circuitry. the wakeup frame indication becomes just another possible alert to the power manage- ment circuitry that the system needs to wake up. if the cs8920 is on an adapter card, a jumper cable must route the ewake signal to the power manag- er circuit. enable / disable wakeup: the system must have a mechanism to enable and disable the wakeup mode of operation in the cs8920. this can be done via hardware mode or software mode. hardware mode: wakeup can be implemented using the cs8920 with no changes to the device driver (such as ndis 3 or odi) application programming in- terfaces, or application programs. anytime the cs8920 senses that the bus has changed state (states are idle and active), the cs8920 goes through a reset. as part of the reset, the cs8920 initializes its control registers from the ee- prom. if the eeprom is programmed to en- able wakeup, then the cs8920 enters the wakeup mode. once a wakeup frame has been detected and if the isa bus remains idle (not powered up), the cs8920 remains in wakeup mode. therefore, if a sleeping pc momen- tarily loses power in the middle of the night, due to a lightening strike or some other reason, the pc will come back up in a wakeup mode. alternative implementations of wakeup from other ic vendors can not guarantee graceful re- covery from power outages, since those ics re- quire explicit software actions to reset control bits after a power up. if the cpu and bus have been inactive, and then become powered, the cs8920 device driver will be loaded. once loaded, the crystal-provided cs8920 device aux +5 v +5 v +12 v vcc plane for cs8920 pmos fet gnd gnd plane for cs8920 nmos fet
AN87 4 AN87rev1 drivers will clear the wakeupen bit in the cs8920 control register, causing the cs8920 to exit wakeup mode. software mode: alternatively, if the bus remains active, the cs8920 can enter and exit wakeup mode via software control. this requires driver and ap- plication changes and is not supported by soft- ware at this time. 3.2 system software and infrastructure considerations wakeup can best be utilized by specialized net- work administration applications such as the ibms netfinity and hps openview systems. these systems are capable of knowing the mac address of each pc on the network, and knowing how to route to each pc (see section 3.3.1) since implementing wakeup technology, there have been many questions concerning the ability of a wakeup frame to actually reach and power up a remote pc. these questions usually center around the ability of the wakeup frame to bridge and route to a remote pc, which may be in the next building or across the country. bridges: since the wakeup frame is a standard ethernet frame, there is no reason a bridge would not for- ward it appropriately. the only difference between a wakeup frame and a standard ethernet frame is the 16 duplications of the 6 byte ieee address, which is carried in the data portion of the frame. the bridge does not even care what is in the data portion of a frame. it only cares about the destina- tion address. the question has also been asked "what happens if a bridge has deleted the address of the end node the wakeup frame is destined for from the bridge address database? will the bridge just throw the frame away?" the answer is no. if a bridge does not know on which port a specific ad- dress is located, the bridge must forward the frame to all ports. this will guarantee that the node, which the frame has been addressed to, will receive it. routers: many networks are separated by routers; a router is almost always used to connect a lan in one build- ing to a lan in another building. routers are used to segment the lan and reduce the number of nodes, as well as the number of broadcast messag- es, on each segment of the lan. again, as above with the bridge, since the wakeup frame is just a simple ethernet frame with a specific data pattern in the data field, there should be no reason why a router would not route the frame like any other. and since the wakeup frame is protocol indepen- dent, it does not matter what protocol the lan is running, whether it be tcp/ip, ipx, or any other. as long as the data portion of the frame arrives in- tact at the destination, it will wake up the target ma- chine. 3.2.1 aging of addresses in routers a significant question centers on the aging of arp (address resolution protocol) tables in routers, as opposed to bridges. in a bridge, when an address has been eliminated from the database, the incom- ing frame would be sent to all ports on the bridge. again, this is in the definition of a bridge. in a rout- er, however, when a frame is received whose ad- dress is not in the database, the router will send an arp out onto the network looking for a response from the node that the frame was addressed to. if the machine is in wakeup mode, it will not respond to this arp and the router will just throw the frame away. obviously, this would negate the ability to remotely wake up a sleeping pc over a routed net- work. however, a method of solving the above problem was presented by ibm engineers, who had been looking at the issue and came up with a novel ap-
AN87 AN87rev1 5 proach to the problem. instead of sending a normal frame to the target machine, the program or system administrator would send a "subnet directed broadcast" to the router to forward to the subnet where the target machine was located. the follow- ing is a step-by-step process to assure the remote wake up of a station beyond a router. 4. system wakeup implementation details using wakeup frames and the cs8920 the cs8920 will recognize a wakeup frame that is received, and can consequently generate a signal to awaken a sleeping or idling system cpu. a com- plete wakeup frame state diagram is shown in fig- ure 1 (included at the end of this document). the key states are as follows: ? normal: the cs8920 is receiving normal packet traffic and is ignoring wakeup frames. ? wake (no bus): the cs8920 is waiting for a wakeup frame and is ignoring all other frames. the isa bus is powered down. typi- cally, the cpu is also powered down. ? wake (bus active): the cs8920 is wait- ing for a wakeup frame and is ignoring all other frames. the isa bus is powered up, and typi- cally the cpu is running with a slowed-down clock. ? reset: the cs8920 is performing an internal reset and all received frames are ignored. the state entered following reset is determined by the contents of the eeprom and by wheth- er or not the isa bus is powered up. ? dropping frame: the cs8920 is looking for normal packet traffic, but the isa bus is not powered up. this is a somewhat abnormal con- dition. 4.1 wakeup frame control/status bits the following control/status bits are associated with the wakeup function. linectl register ? bit f, wakeupen: set this bit to enable the wakeup function. all non-wakeup frames are discarded when wakeup is enabled. this bit de- faults to clear, meaning wakeup frame recogni- tion is disabled. when recognition is disabled, the ewake pin remains low independent of the state of linectl, bit a. ? bit a, routewakeup: set this bit to route the wakeup signal to both the presently pro- grammed interrupt pin and the ewake pin. this bit defaults to clear, meaning the wakeup signal is routed only to the ewake pin. note that the interrupt pin is used only if the cs8920 has determined that the isa bus is powered up. rxevent register (or isq) ? bit f, wakeup frame received: this bit is set when a valid wakeup frame is received. this bit is cleared when read. it may be set again only by a new wakeup frame. for more information about the status and control bits, see the cs8920 data sheet. 4.2 normal state while in the normal state, the cs8920 receives all packets and does not check for wakeup frames. the cs8920 remains in normal state until a re- set occurs or until the software sets the wakeupen bit to 1. the reset causes the cs8920 to enter the reset state. setting wakeupen to 1 causes the cs8920 to enter the wake (bus active) state. while in the normal state, and before entering the wake (bus active) state, the cs8920 must be initialized with the following information: ? ia must be loaded into the cs8920. ? rxctl must be set for appropriate address fil- tering set. ? linectl register, bit serrxon, must be set. this turns on the receiver.
AN87 6 AN87rev1 ? the routewakeup bit (linectl, bit a) must be configured. ? if an interrupt is being used, an interrupt pin must be selected via busctl register, bit f. if the cs8920 is to enter the wake (no bus) or wake (bus active) state from the reset mode, then during the normal state, the soft- ware must ensure that the eeprom initialization section contains the following: ? wakeupen bit set to 1. ? individual address ? rxctl must be set for appropriate address fil- tering set. ? linectl register, bit serrxon, must be set. this turns on the receiver. ? the routewakeup bit (linectl, bit a) must be configured. if the cs8920 enters the wake (bus active) state from the reset state, the driver may select an interrupt pin via the busctl register, bit f after the reset. selecting the interrupt pin via the ee- prom may interfere with pnp configuration man- agement. 4.3 reset state the cs8920 enters the reset state in response to one of the following: a) the isa bus reset signal is recognized. note that if the cs8920 has previously recognized that the isa bus was powered down, the cs8920 qualifies a reset request by 15 transi- tions on memrb. this qualification filters spu- rious signals on the reset pin. b) a reset request is written to bit 6 of register selfctl (register 15). c) the isa bus transitions from powered up to powered down, as determined by the isa sig- nals memrb, memwb, iorb and iowb all being low at the same time. note that a "ctrl-alt-del" does not reset the isa bus. during the reset state, the cs8920 does an inter- nal hardware reset, ignores all incoming frames, and reads the eeprom, including the burned-in ieee address. during reset, the cs8920 also shuts off the cs8920 isa bus drivers. the drivers remain off until the cs8920 detects 15 transitions of memrb. also, the cs8920 does not allow isa ac- cesses before eeprom initialization. based on the state of the isa bus (powered or not powered), and based on the state of the wakeupen bit as read from the eeprom, the cs8920 will exit the reset state and enter one of the normal, wake (bus active), wake (no bus), or dropping packets states, as shown in table 1. 4.4 wake (no bus) state in the wake (no bus) state, the isa bus is pow- ered down, and the wakeupen bit is set to 1. typ- ically, the cpu and chipset clocks will also be stopped. in this state, the cs8920 remains pow- ered, discards all non-wakeup frames, and shuts off the cs8920 isa bus drivers. upon wakeup frame recognition, the cs8920 gen- state entered wakeupen from eeprom isa bus normal 0 powered dropping packet 0 not powered wake (no bus) 1 not powered wake (bus active) 1 powered table 1: states following reset state
AN87 AN87rev1 7 erates a signal on the ewake pin that can be con- nected by jumper to the system power manager. an ewake output signal will be a logic high for ap- proximately 50 ms. the system power manager function can then wake up the system. after generating the ewake signal, the cs8920 checks that the isa bus is still powered off, and that there is no reset request. if these conditions are true, the cs8920 returns to the wake (no bus) state. otherwise, the cs8920 enters the reset state. note that the cs8920 determines that the isa bus is powered by looking for 15 transitions on memrb. 4.5 wake (bus active) state in the wake (bus active) state, the isa bus is powered up, and the cpu is typically operating at a low clock rate to save power. this state is entered when either: a) the cs8920 is in normal state, and the soft- ware sets wakeupen bit to 1; or b) while in reset state, the cs8920 detects that the isa bus is powered and the wakeupen bit is set to 1 by the eeprom. in this state, the cs8920 is powered up, looks for wakeup frame, and discards all other frames. upon wakeup frame recognition, the cs8920 can wake up the cpu using either just the ewake pin, or a combination of the ewake pin and an isa-bus in- terrupt. for the cs8920 to signal a wakeup interrupt, the routewakeup bit (linectl, bit a) must be set. when a wakeup frame is recognized, the presently programmed interrupt pin remains asserted until the interrupt has been acknowledged by reading the isq. the host is responsible for determining the in- terrupt cause. the wakeup interrupt signal meets all isa bus requirements for interrupt signals. after the wakeup signals are generated, the cs8920 will automatically reset the wakeupen bit to 0 and return to normal state. alternatively, the cs8920 will transition from the wake (bus active) state to the reset state at any time if the isa bus transitions to powered down or if a reset signal is recognized. 4.6 dropping packets state the cs8920 will enter the dropping packets state after reset if the isa bus is not powered, and if wakeupen is off. the cs8920 will look for nor- mal frames, ignore wakeup frames, and shut off the cs8920 isa bus drivers. therefore, the cs8920 will not pass received frames to the cpu. this state is exited and the reset state is entered upon de- tecting that the isa bus in now powered, or upon reset signal recognition.
AN87 8 AN87rev1 table 2: wakeup states magic packet is a trademark of amd. wake(no bus) state 8920 isa drivers are off. ignoring normal frames. looking for wakeup wake (bus active) state 8920 isa drivers are on/active. ignoring normal frames. looking for wakeup normal mode - isa drivers on - looking for normal frames - ignoring wakeup frames reset = 1 or isa = off isa = on and wakeupen = 0 reset = 1 wakeupen control register bit set to 1 (wakeup disabled) by software over the isa bus. (eeprom unchanged). wakeupen control register bit set to 0 (wakeup disabled) by software over the isa bus. (eeprom unchanged) isa = off (causing reset = 1) isa = on and wakeupen = 1 isa = off and wakeupen = 1 (from the eeprom) isa = on or reset = 1 (qualified) reset state cs8920 inactive during reset. copy eeprom value to wakeupen control register bit. normal frames are ignored. isa = on or reset = 1 (qualified) receive wakeup frame asserting ewake or generate intrq dropping norm packets ignoring wakeup frame. 8920 drivers off. rxmiss occuring. assert ewake pin. isa = on or reset = 1 (qualified) receive wakeup frame isa = off and reset = 0 isa = off and wakeupen = 0 reset is defined as an isa bus reset signal. isa off is defined as the sensing of the isa signals in the power off state. this is accomplished when memr_b = memw_b = ior_b = 0, which can only happen when the isa bus is powered off. action: deassert wakeupen in control register (eeprom unchanged) action: deassert wakeupen in control register (eeprom unchanged)


▲Up To Search▲   

 
Price & Availability of AN87

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X